#pragma once

#include "Behaviour.h"
#include "HUDtimer.h"
#include "MainCounterState.h"
#include "SignalSlot.h"

namespace game_engine { namespace library
{

/*!
 * \class Counter
 * \brief 
 */
class Counter : public game_engine::components::Behaviour
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
public:
    cSignal<INT32, FLOAT32> signalValueUpdated;

private:
    TimerMode mode;
    FLOAT32 value;
    MainCounterState *state;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    Counter(void);
    Counter(GameObject *obj);
    virtual ~Counter(void);

    // Others
    void initialize(void) throw(...);

    // Getters
	const TimerMode& getMode(void) const;
    const FLOAT32 getValue(void) const;

    // Setters
	void setMode(const TimerMode &m);
    void setValue(const FLOAT32 val);

};

}}
